-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Limit the size of the statement for further gossiping #9965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e_dev --bump patch'
|
/cmd prdoc --audience node_dev --bump minor |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
# Description Fixes gossiping and scalability issues in the statement-store networking. 1. Reduced gossiping traffic by propagating only recent statements instead of all. 2. Added an early check for statements that the node already has to skip duplicate processing. 3. Added splitting of large statement batches to stay under MAX_STATEMENT_NOTIFICATION_SIZE; oversized individual statements are skipped. 4. MAX_STATEMENT_NOTIFICATION_SIZE was updated to the commonly used 1MB, which drastically improved the gossiping speed. 5. Notifications are sent asynchronously. I don't see much difference in performance, but according to @lexnv, it's better to do: #9296. 6. Added a 10s timeout to handle very slow or disconnected peers. ## Integration Internal optimizations to the gossip protocol. No downstream changes required. Related PR: #9965 ## Things to handle in further PRs - After this PR, nodes don't send all statements to new peers anymore, only the recent ones. - After restarting, the node doesn't re-gossip statements it wasn't gossiped. - Broadcasting notifications to all peers when the first peer is slow is limited. We could instead use a FuturesUnordered. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]>
# Description Fixes gossiping and scalability issues in the statement-store networking. 1. Reduced gossiping traffic by propagating only recent statements instead of all. 2. Added an early check for statements that the node already has to skip duplicate processing. 3. Added splitting of large statement batches to stay under MAX_STATEMENT_NOTIFICATION_SIZE; oversized individual statements are skipped. 4. MAX_STATEMENT_NOTIFICATION_SIZE was updated to the commonly used 1MB, which drastically improved the gossiping speed. 5. Notifications are sent asynchronously. I don't see much difference in performance, but according to @lexnv, it's better to do: #9296. 6. Added a 10s timeout to handle very slow or disconnected peers. ## Integration Internal optimizations to the gossip protocol. No downstream changes required. Related PR: #9965 ## Things to handle in further PRs - After this PR, nodes don't send all statements to new peers anymore, only the recent ones. - After restarting, the node doesn't re-gossip statements it wasn't gossiped. - Broadcasting notifications to all peers when the first peer is slow is limited. We could instead use a FuturesUnordered. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]>
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-9965-to-stable2506
git worktree add --checkout .worktree/backport-9965-to-stable2506 backport-9965-to-stable2506
cd .worktree/backport-9965-to-stable2506
git reset --hard HEAD^
git cherry-pick -x de740e1892f47e91c356858324f6e3e4b0f1be60
git push --force-with-lease |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-9965-to-stable2509
git worktree add --checkout .worktree/backport-9965-to-stable2509 backport-9965-to-stable2509
cd .worktree/backport-9965-to-stable2509
git reset --hard HEAD^
git cherry-pick -x de740e1892f47e91c356858324f6e3e4b0f1be60
git push --force-with-lease |
Fixes gossiping and scalability issues in the statement-store networking. 1. Reduced gossiping traffic by propagating only recent statements instead of all. 2. Added an early check for statements that the node already has to skip duplicate processing. 3. Added splitting of large statement batches to stay under MAX_STATEMENT_NOTIFICATION_SIZE; oversized individual statements are skipped. 4. MAX_STATEMENT_NOTIFICATION_SIZE was updated to the commonly used 1MB, which drastically improved the gossiping speed. 5. Notifications are sent asynchronously. I don't see much difference in performance, but according to @lexnv, it's better to do: #9296. 6. Added a 10s timeout to handle very slow or disconnected peers. Internal optimizations to the gossip protocol. No downstream changes required. Related PR: #9965 - After this PR, nodes don't send all statements to new peers anymore, only the recent ones. - After restarting, the node doesn't re-gossip statements it wasn't gossiped. - Broadcasting notifications to all peers when the first peer is slow is limited. We could instead use a FuturesUnordered. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit b21cbb5)
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-9965-to-unstable2507
git worktree add --checkout .worktree/backport-9965-to-unstable2507 backport-9965-to-unstable2507
cd .worktree/backport-9965-to-unstable2507
git reset --hard HEAD^
git cherry-pick -x de740e1892f47e91c356858324f6e3e4b0f1be60
git push --force-with-lease |
Backport #9965 into `stable2509` from AndreiEres. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Andrei Eres <[email protected]> Co-authored-by: gui1117 <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
Backport #9965 into `stable2506` from AndreiEres. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Andrei Eres <[email protected]> Co-authored-by: gui1117 <[email protected]> Co-authored-by: Egor_P <[email protected]>
Description
Limits the size of statements that are further gossiped over the network to prevent skipping oversized messages. The limit is set to match the network protocol's max statement notification size (1 MB), accounting for 1-byte vector length overhead because statements are sent as
Vec<Statement>.Integration
Affected crates:
sc-statement-store: Now depends onsc-network-statementfor size constantssc-network-statement:MAX_STATEMENT_NOTIFICATION_SIZEis now publicFor downstream users: